﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dropthings.DAL;
using System.Data;

namespace Dropthings.Business.Facade
{
    public partial class Facade
    {
        public bool AddUserOrganizeIdentify(Guid userGuid, string organizeIdentify)
        {
            UQ_AddUserOrganizeIdentify query = new UQ_AddUserOrganizeIdentify(userGuid, organizeIdentify);
            return query.ExecuteNonQuery() > 0 ? true : false;
        }

        public bool UpdateUserOrganizeIdentify(Guid userGuid, string organizeIdentify)
        {
            UQ_UpdateUserOrganizeIdentify query = new UQ_UpdateUserOrganizeIdentify(userGuid, organizeIdentify);
            return query.ExecuteNonQuery() > 0 ? true : false;
        }

        public bool DeleteUserOrganizeIdentify(Guid userGuid)
        {
            UQ_DeleteUserOrganizeIdentify query = new UQ_DeleteUserOrganizeIdentify(userGuid);
            return query.ExecuteNonQuery() > 0 ? true : false;
        }

        public string GetUserOrganizeIdentify(Guid userGuid)
        {
            UQ_GetUserOrganizeIdentify query = new UQ_GetUserOrganizeIdentify(userGuid);
            object obj = query.ExecuteScalar();
            if (obj != null)
                return obj.ToString();
            return string.Empty;
        }

        public DataSet ListUserOrganizeIdentify()
        {
            UQ_ListUserOrganizeIdentify query = new UQ_ListUserOrganizeIdentify();
            return query.ExecuteDataset();
        }
    }
}
